package com.itheima.reggie.service;

import com.itheima.reggie.entity.Orders;
import com.itheima.reggie.entity.Page;
import com.itheima.reggie.entity.dto.OrderDto;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;

public interface OrderService {

    //下单
    @Transactional
    void addOrder(Orders orders);

    //分页查询订单表
    Page<Orders> findByPage(Integer page, Integer pageSize, @Param("number") String number, @Param("benTime") String benTime,@Param("endTime") String endTime);

    //移动端查询历史订单
    Page<OrderDto> findByPageUserid(Integer page, Integer pageSize, Long userId);
}
